<template>
    <h3>列表渲染</h3>
    <p v-for="(item,index) in names">{{ item }}-{{ index }}</p>
    <div v-for="item of result">
        <p>{{ item.title }}</p>
    </div>
    <div>
        <p v-for="(value,key,index) of userinfo">{{ value }}-{{ key }}-{{ index }}</p>
    </div>
</template>
<script>
    export default{
        data(){
            return{
                names:["2333","adwad","dddd"],
                //v-for遍历数组
                result:[
                    {   "id":22501,
                        "title":"这是标题1"
                    },
                    {
                        "id":22502,
                        "title":"这是标题2"
                    },
                    {
                        "id":22503,
                        "title":"这是标题3"
                    }
                ],
                //v-for遍历对象
                userinfo:{
                    name:"iwen",
                    age:20,
                    sex:"男"
                }
            }
            
        }
    }
</script>